# this shell script will test the paramter for powershell.
<# the basic method logic to judge the parameter validity #>
# Param(
#    $Path
# G)
# If (-Not $Path -eq '') {
#    New-Item $Path
#    Write-Host "File created at path $Path"
# } Else {
#    Write-Error "Path cannot be empty"
# } 
<# the more effective and popular method is to use the parameter[] #>
Param(
    # to show the helpMessage tips,just type `!?`
    [Parameter(Mandatory, HelpMessage = "input your valid path(for demonstrate,I will just output to show the path.")]
    # [Parameter(Mandatory, HelpMessage = "Please provide a valid path")] 
    $path
)
# the logic of your script,in the script ,I just use it to out put a sentence 
Write-Output $path

